﻿using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;

namespace TemplateDemo.Common
{
    public class Md5Helper
    {
        public static string GetMd5ByString(string source)
        {
            MD5 md5 = MD5.Create();
            byte[] bytes = Encoding.UTF8.GetBytes(source);
            string result = BitConverter.ToString(md5.ComputeHash(bytes));
            return result.Replace("-", "");
        }
    }
}
